package com.example.ljw.paperlive.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by LJW on 2016/11/24.
 */

public class FamliyViewPagerAdapter extends FragmentPagerAdapter {
    private List<Fragment> list;
    private String[] mArrTitles = null;
    public FamliyViewPagerAdapter(FragmentManager fm,List<Fragment> list, String[] mArrTitles) {
        super(fm);
        this.list=list;
        this.mArrTitles=mArrTitles;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mArrTitles[position];
    }
}
